JavaScript

A5.u.arraycombine Method

Syntax

A5.u.array.combine(arrayA,arrayB)

Arguments

arrayAarray

The array to include the items in.

arrayBarray

The array of items to include.

Returns

actionsobject

The operation preformed on each item in the second array.

addedarray

The indexes of the items in the second array that were unique and therefore added to the first.

skippedarray

The indexes of the items in the second array that were not unique and therefore not added to the first.

Description

Include the unique items from the second array in the first.

Example

var a = [1,2,4,5,7,8];
var b = [3,2];
var res = A5.u.array.combine(a,b);
// a = [1,2,4,5,7,8,3]
// res = {added: [0], skipped: [1]}